[]
获取所有角色。
参数
| 名称 | 类型 | 位置 | 描述 | 示例 |
|---|---|---|---|---|
| IncludePermissions | Boolean | query | 查询结果中是否包含角色的权限。 | true |
| IncludeMembers | Boolean | query | 查询结果中是否包含该角色的成员。 | |
| SearchType | SearchType | query | 搜索类型,可用值为 "None" 和 "Count". | "Count" |
响应
状态代码: 200
成功
添加新角色。
请求架构
name
响应
状态代码: 201
成功
状态代码: 400
错误的请求
获取不属于任何组织的所有角色。
参数
| 名称 | 类型 | 位置 | 描述 | 示例 |
|---|---|---|---|---|
| IncludePermissions | Boolean | query | 查询结果中是否包含角色的权限。 | true |
| IncludeMembers | Boolean | query | 查询结果中是否包含该角色的成员。 | |
| SearchType | SearchType | query | 搜索类型,可用值为 "None" 和 "Count". | "Count" |
响应
状态代码: 200
成功
获取当前登录用户的所有全局角色。
参数
| 名称 | 类型 | 位置 | 描述 |
|---|---|---|---|
| all | Boolean | query | 是否获取所有全局角色,仅在当前登录用户为系统管理员时生效。 例如: false |
响应
状态代码: 200
成功
通过id获取角色信息。
参数
| 名称 | 类型 | 位置 | 描述 |
|---|---|---|---|
| id必填项 | string | path | 角色id. |
| includePermission | Boolean | query | 是否获取指定角色的权限。 例如: true |
响应
状态代码: 200
成功
状态代码: 404
未找到
删除角色。
参数
| 名称 | 类型 | 位置 | 描述 |
|---|---|---|---|
| id必填项 | string | path | 角色id. |
响应
状态代码: 204
成功
状态代码: 400
错误请求
状态代码: 404
未找到
获取属于指定角色的所有用户。
参数
| 名称 | 类型 | 位置 | 描述 |
|---|---|---|---|
| id必填项 | string | path | 角色id. |
响应
状态代码: 200
成功
状态代码: 404
未找到
将用户添加到指定角色。
参数
| 名称 | 类型 | 位置 | 描述 |
|---|---|---|---|
| id必填项 | string | path | 角色id. |
请求架构
响应
状态代码: 200
成功
状态代码: 400
错误请求
状态代码: 404
未找到
更新属于指定角色的用户。
参数
| 名称 | 类型 | 位置 | 描述 |
|---|---|---|---|
| id必填项 | string | path | 角色id. |
请求架构
响应
状态代码: 200
成功
状态代码: 400
错误请求
状态代码: 404
未找到
删除属于指定角色的指定用户。
参数
| 名称 | 类型 | 位置 | 描述 |
|---|---|---|---|
| id必填项 | string | path | 角色id。 |
| userId必填项 | string | path | 用户id。 |
响应
状态代码: 204
成功
状态代码: 400
错误请求
状态代码: 404
未找到
获取指定角色的权限。
参数
| 名称 | 类型 | 位置 | 描述 |
|---|---|---|---|
| id必填项 | string | path | 角色id。 |
响应
状态代码: 200
成功
状态代码: 404
未找到
更新指定角色的权限。
参数
| 名称 | 类型 | 位置 | 描述 |
|---|---|---|---|
| id必填项 | string | path | 角色id。 |
请求架构
响应
状态代码: 200
成功
状态代码: 400
错误请求
状态代码: 404
未找到
导入角色。
请求架构
响应
状态代码: 200
成功
状态代码: 400
错误请求
Enum:
NoneCount用于搜索记录的搜索类型。
* None - 0 - 正常搜索。
* Count - 1 - 仅检索记录计数。
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| id可为空 | string | 角色的唯一标识。 | "972B2A4C-8C61-4E3B-AD3D-6E889FE8D761" |
| name可为空 | string | 角色的名称。 | "DataManager" |
| creatorId可为空 | string | 角色的创建者ID。 | "CF61388C-D7CD-4A61-8FB3-A8A0B6915F3E" |
| createTime | ISO DateTime Sting | 角色的创建时间。 | "2000-01-01 00:00:00.000" |
| isBuiltin | Boolean | 是否是内置角色。 | |
| allowEditPermissions | Boolean | 是否允许编辑角色的权限。 | true |
| permissions可为空 | Array<string> |
角色的权限。 | ["view-report","view-dashboard"] |
| members可为空 | Array<string> |
角色的成员id列表。 | ["CD079B35-4A56-4F42-845D-726B09E08EA9","EAAA677A-7B0A-4471-99F0-4C3F1D31738C"] |
| tenantId可为空 | string | 角色所属组织的id。 | "D6FD678D-45B5-4222-BA81-58BE2E578F91" |
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| id可为空 | string | ||
| name可为空 | string | ||
| creatorId可为空 | string | ||
| createTime | ISO DateTime Sting | ||
| isBuiltin | Boolean | ||
| allowEditPermissions | Boolean | ||
| tenantId可为空 | string | ||
| creator | UserModel | ||
| userRoles可为空 | UserRoleModel | ||
| permissions可为空 | RolePermissionModel | ||
| tenant | TenantModel |
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| id可为空 | string | ||
| username可为空 | string | ||
| passwordHash可为空 | string | ||
| email可为空 | string | ||
| mobile可为空 | string | ||
| providerId可为空 | string | ||
| avatar可为空 | string | ||
| firstName可为空 | string | ||
| lastName可为空 | string | ||
| creationTime | ISO DateTime Sting | ||
| enabled | Boolean | ||
| fullName可为空 | string | ||
| organizationIdPath可为空 | string | ||
| userRoles可为空 | UserRoleModel | ||
| userGroups可为空 | UserGroupModel | ||
| userProperties可为空 | UserPropertyModel | ||
| extraClaims可为空 | UserClaimModel | ||
| userTenants可为空 | UserTenantModel | ||
| userAvatar | UserAvatarModel |
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| userId可为空 | string | ||
| roleId可为空 | string | ||
| user | UserModel | ||
| role | RoleModel |
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| roleId可为空 | string | ||
| permissionName可为空 | string | ||
| role | RoleModel |
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| id可为空 | string | ||
| 名称 | string | ||
| description可为空 | string | ||
| enabled | Boolean | ||
| parentTenantId可为空 | string | ||
| path可为空 | string | ||
| order | int32 | ||
| createTime | ISO DateTime Sting | ||
| parentTenant | TenantModel | ||
| tenantPropValues可为空 | TenantPropValueModel | ||
| userTenants可为空 | UserTenantModel | ||
| tenantRoles可为空 | RoleModel | ||
| tenantSettings可为空 | TenantSettingModel | ||
| tenantPropRestrictions可为空 | TenantPropRestrictionModel |
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| groupId可为空 | string | ||
| userId可为空 | string | ||
| group | GroupModel | ||
| user | UserModel |
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| id可为空 | string | ||
| userId | string | ||
| propertyId | string | ||
| propertyValue可为空 | string | ||
| user | UserModel | ||
| property | CustomizePropertyModel |
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| name可为空 | string | ||
| value可为空 | string | ||
| userId可为空 | string | ||
| user | UserModel |
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| userId | string | ||
| tenantId | string | ||
| user | UserModel | ||
| tenant | TenantModel |
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| userId可为空 | string | ||
| image可为空 | string | ||
| lastModified | ISO DateTime Sting | ||
| user | UserModel |
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| id可为空 | string | ||
| name可为空 | string | ||
| creatorId可为空 | string | ||
| creationTime | ISO DateTime Sting | ||
| parentGroupId可为空 | string | ||
| path可为空 | string | ||
| parentGroup | GroupModel | ||
| creator | UserModel | ||
| userGroups可为空 | UserGroupModel |
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| id可为空 | string | ||
| name可为空 | string | ||
| showInList | Boolean | ||
| allowUserEdit | Boolean | ||
| multivalued | Boolean | ||
| showInProfile | Boolean | ||
| availableValues可为空 | CustomizePropertyAvailableValueModel | ||
| userProperties可为空 | UserPropertyModel |
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| customizePropertyId可为空 | string | ||
| value可为空 | string | ||
| customizeProperty | CustomizePropertyModel |
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| id可为空 | string | ||
| tenantId | string | ||
| tenantPropId | string | ||
| value可为空 | string | ||
| tenant | TenantModel | ||
| tenantProp | TenantPropModel |
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| id可为空 | string | ||
| tenantId可为空 | string | ||
| pluginKey可为空 | string | ||
| settingsGroupKey可为空 | string | ||
| settings可为空 | string | ||
| tenant | TenantModel | ||
| settingsText可为空 | string |
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| tenantId | string | ||
| tenantPropId | string | ||
| allowSubTenantEditing | Boolean | ||
| allowSubTenantViewing | Boolean | ||
| tenant | TenantModel | ||
| tenantProp | TenantPropModel |
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| id可为空 | string | ||
| 名称 | string | ||
| description可为空 | string | ||
| required | Boolean | ||
| valueType | TenantPropValueType | ||
| multivalued | Boolean | ||
| tenantpropRestrictions可为空 | TenantPropRestrictionModel | ||
| tenantPropValues可为空 | TenantPropValueModel |
Enum:
TextBooleanNumberPassword组织属性的值类型。
* Text - 0 - A normal string.
* Boolean - 1 - 一个 boolean 值。
* Number - 2 - 一个 number 值。
* Password - 3 - 用作密码的字符串。
该模型用于描述处理 Web 请求时发生的所有错误。
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| errors可为空 | ApiError | 错误列表。 |
该模型用于描述处理 Web 请求时发生的错误。
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| code可为空 | string | 错误的唯一标识。 | |
| message可为空 | string | 错误的描述文本。 | |
| context可为空 | string | 错误的一些相关上下文信息。 |
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| id可为空 | string | ||
| username可为空 | string | ||
| email可为空 | string | ||
| mobile可为空 | string | ||
| provider可为空 | string | ||
| avatar可为空 | string | ||
| firstName可为空 | string | ||
| lastName可为空 | string | ||
| creationTime | ISO DateTime Sting | ||
| status | UserStatus | ||
| fullName可为空 | string | ||
| organizationIdPath可为空 | string | ||
| roles可为空 | Array<string> |
||
| customizeProperties可为空 | Array<string> |
||
| extraClaims可为空 | string | ||
| tenantRoles可为空 | Array<string> |
Enum:
NormalDisabled用户的状态。
* Normal - 1 - 正常状态。
* Disabled - 2 - 禁用状态。
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| userIds | Array<string> |
用户 ID 列表。 | ["F00FC3E6-8554-467D-9A7E-4598E623BB2F","8259E551-5AFB-489E-8593-0FD6384E123B"] |
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| name可为空 | string | ||
| description可为空 | string | ||
| enabled | Boolean | ||
| order | int32 | ||
| module可为空 | string | ||
| category可为空 | string | ||
| isCustomPermission | Boolean |
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| permissions | Array<string> |
权限列表。 | ["view-dashboard","view-report"] |
| 名称 | 类型 | 描述 | 示例 |
|---|---|---|---|
| roles | RoleBizModel | 角色列表。 |